<?php /* Smarty version 2.6.14, created on 2012-11-01 15:28:00
         compiled from video.tpl */
?><?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'truncate', 'video.tpl', 21, false),array('modifier', 'count_characters', 'video.tpl', 21, false),array('modifier', 'nl2br', 'video.tpl', 23, false),array('modifier', 'replace', 'video.tpl', 49, false),array('modifier', 'escape', 'video.tpl', 196, false),array('modifier', 'default', 'video.tpl', 225, false),array('function', 'math', 'video.tpl', 137, false),)), $this);
?><?php
SELanguage::_preload_multi(5500076,5500101,5500027,5500024,5500037,5500038,5500147,39,155,175,182,183,184,185,187,784,787,829,830,831,832,833,834,835,854,856,891,1025,1026,1032,1034,1071,5500022,589,5500023,5500070);
SELanguage::load();
?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>


<div class='page_header'>
  <?php ob_start(); 
 echo $this->_tpl_vars['url']->url_create('profile',$this->_tpl_vars['owner']->user_info['user_username']); ?>
&v=video<?php $this->_smarty_vars['capture']['default'] = ob_get_contents();  $this->assign('owner_url', ob_get_contents());ob_end_clean(); ?>
  <?php echo sprintf(SELanguage::_get(5500076), $this->_tpl_vars['owner_url'], $this->_tpl_vars['owner']->user_displayname); ?>
</div>


<table cellpadding='0' cellspacing='0' border='0' style='margin-top: 10px;' width='100%'>
<tr>
<td valign='top' align='left'>
    
    <div style='padding:2px;border:1px solid #c0c0c0;'>
    <div class='videoHeader' style='width:<?php echo $this->_tpl_vars['setting']['setting_video_width']; ?>
px'>
      <div class='inner' style='cursor:default'>
        <h1><?php echo $this->_tpl_vars['video_info']['video_title']; ?>
</h1>
        <h2 id='short_desc'><?php echo ((is_array($_tmp=$this->_tpl_vars['video_info']['video_desc'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 100, "...", true) : smarty_modifier_truncate($_tmp, 100, "...", true)); 
 if (((is_array($_tmp=$this->_tpl_vars['video_info']['video_desc'])) ? $this->_run_mod_handler('count_characters', true, $_tmp, true) : smarty_modifier_count_characters($_tmp, true)) > 100): ?> (<a href='javascript:void(0);' onClick="$('short_desc').style.display = 'none'; $('long_desc').style.display = 'block';"><?php echo SELanguage::_get(5500101); ?></a>)<?php endif; ?></h2>
        <?php if (((is_array($_tmp=$this->_tpl_vars['video_info']['video_desc'])) ? $this->_run_mod_handler('count_characters', true, $_tmp, true) : smarty_modifier_count_characters($_tmp, true)) > 100): ?>
          <h2 id='long_desc' style='display:none'><?php echo ((is_array($_tmp=$this->_tpl_vars['video_info']['video_desc'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
 (<a href='javascript:void(0);' onClick="$('short_desc').style.display = 'block'; $('long_desc').style.display = 'none';"><?php echo SELanguage::_get(5500027); ?></a>)</h2>
        <?php endif; ?>
      </div>          
    </div>
        
        <?php if ($this->_tpl_vars['video_info']['video_type'] == 1): ?>

<object width="<?php echo $this->_tpl_vars['setting']['setting_video_width']; ?>
" height="<?php echo $this->_tpl_vars['setting']['setting_video_height']; ?>
"><param name="wmode" value="transparent"></param><param name="movie" value="http://www.youtube.com/v/<?php echo $this->_tpl_vars['video_info']['video_youtube_code']; ?>
&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed wmode="transparent" src="http://www.youtube.com/v/<?php echo $this->_tpl_vars['video_info']['video_youtube_code']; ?>
&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="<?php echo $this->_tpl_vars['setting']['setting_video_width']; ?>
" height="<?php echo $this->_tpl_vars['setting']['setting_video_height']; ?>
"></embed></object>

    <?php endif; ?>
    <?php if ($this->_tpl_vars['video_info']['video_type'] == 0): ?>
    <?php echo '
    <script type="text/javascript" src="./include/flow_player/flashembed-1.0.1.pack.js"></script>
    <script type=\'text/javascript\'>
    <!--
      flashembed("sevideo_player", 
      {
        src:"./include/flow_player/flowplayer-3.1.5.swf",
        width: '; 
 echo $this->_tpl_vars['setting']['setting_video_width']; 
 echo ', 
        height: '; 
 echo $this->_tpl_vars['setting']['setting_video_height']; 
 echo ',
        wmode: \'transparent\'
      },
      {
        config: {
          clip: {
            url: \''; 
 echo $this->_tpl_vars['url']->url_base; 
 echo ((is_array($_tmp=$this->_tpl_vars['video_info']['video_dir'])) ? $this->_run_mod_handler('replace', true, $_tmp, './', '') : smarty_modifier_replace($_tmp, './', '')); 
 echo $this->_tpl_vars['video_info']['video_id']; ?>
.flv<?php echo '\',
            autoPlay: false,
            autoBuffering: true
          },
          plugins: {
            controls: {
              background: \'#000000\',
              bufferColor: \'#333333\',
              progressColor: \'#444444\',
              buttonColor: \'#444444\',
              buttonOverColor: \'#666666\'
            }
          },
          canvas: { 
            backgroundColor:\'#000000\'
          }
        }
      });
    //-->
    </script>
    '; ?>
      
    <?php endif; ?>
        <div id='sevideo_player'></div>
  </div>  
      

    <div class='videoInfo' style='width:<?php echo $this->_tpl_vars['setting']['setting_video_width']; ?>
px'>
        
    <div id='tab'>

            <?php if (! $this->_tpl_vars['allowed_to_rate']): ?>
	<div id='video_rating' style='float: left;'>
          <?php unset($this->_sections['full_loop']);
$this->_sections['full_loop']['name'] = 'full_loop';
$this->_sections['full_loop']['start'] = (int)0;
$this->_sections['full_loop']['loop'] = is_array($_loop=$this->_tpl_vars['video_info']['video_rating_full']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['full_loop']['show'] = true;
$this->_sections['full_loop']['max'] = $this->_sections['full_loop']['loop'];
$this->_sections['full_loop']['step'] = 1;
if ($this->_sections['full_loop']['start'] < 0)
    $this->_sections['full_loop']['start'] = max($this->_sections['full_loop']['step'] > 0 ? 0 : -1, $this->_sections['full_loop']['loop'] + $this->_sections['full_loop']['start']);
else
    $this->_sections['full_loop']['start'] = min($this->_sections['full_loop']['start'], $this->_sections['full_loop']['step'] > 0 ? $this->_sections['full_loop']['loop'] : $this->_sections['full_loop']['loop']-1);
if ($this->_sections['full_loop']['show']) {
    $this->_sections['full_loop']['total'] = min(ceil(($this->_sections['full_loop']['step'] > 0 ? $this->_sections['full_loop']['loop'] - $this->_sections['full_loop']['start'] : $this->_sections['full_loop']['start']+1)/abs($this->_sections['full_loop']['step'])), $this->_sections['full_loop']['max']);
    if ($this->_sections['full_loop']['total'] == 0)
        $this->_sections['full_loop']['show'] = false;
} else
    $this->_sections['full_loop']['total'] = 0;
if ($this->_sections['full_loop']['show']):

            for ($this->_sections['full_loop']['index'] = $this->_sections['full_loop']['start'], $this->_sections['full_loop']['iteration'] = 1;
                 $this->_sections['full_loop']['iteration'] <= $this->_sections['full_loop']['total'];
                 $this->_sections['full_loop']['index'] += $this->_sections['full_loop']['step'], $this->_sections['full_loop']['iteration']++):
$this->_sections['full_loop']['rownum'] = $this->_sections['full_loop']['iteration'];
$this->_sections['full_loop']['index_prev'] = $this->_sections['full_loop']['index'] - $this->_sections['full_loop']['step'];
$this->_sections['full_loop']['index_next'] = $this->_sections['full_loop']['index'] + $this->_sections['full_loop']['step'];
$this->_sections['full_loop']['first']      = ($this->_sections['full_loop']['iteration'] == 1);
$this->_sections['full_loop']['last']       = ($this->_sections['full_loop']['iteration'] == $this->_sections['full_loop']['total']);
?>
	    <img src='./images/icons/video_rating_full.gif' border='0'>
	  <?php endfor; endif; ?>
	  <?php if ($this->_tpl_vars['video_info']['video_rating_part']): ?><img src='./images/icons/video_rating_part.gif' border='0'><?php endif; ?>
          <?php unset($this->_sections['none_loop']);
$this->_sections['none_loop']['name'] = 'none_loop';
$this->_sections['none_loop']['start'] = (int)0;
$this->_sections['none_loop']['loop'] = is_array($_loop=$this->_tpl_vars['video_info']['video_rating_none']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['none_loop']['show'] = true;
$this->_sections['none_loop']['max'] = $this->_sections['none_loop']['loop'];
$this->_sections['none_loop']['step'] = 1;
if ($this->_sections['none_loop']['start'] < 0)
    $this->_sections['none_loop']['start'] = max($this->_sections['none_loop']['step'] > 0 ? 0 : -1, $this->_sections['none_loop']['loop'] + $this->_sections['none_loop']['start']);
else
    $this->_sections['none_loop']['start'] = min($this->_sections['none_loop']['start'], $this->_sections['none_loop']['step'] > 0 ? $this->_sections['none_loop']['loop'] : $this->_sections['none_loop']['loop']-1);
if ($this->_sections['none_loop']['show']) {
    $this->_sections['none_loop']['total'] = min(ceil(($this->_sections['none_loop']['step'] > 0 ? $this->_sections['none_loop']['loop'] - $this->_sections['none_loop']['start'] : $this->_sections['none_loop']['start']+1)/abs($this->_sections['none_loop']['step'])), $this->_sections['none_loop']['max']);
    if ($this->_sections['none_loop']['total'] == 0)
        $this->_sections['none_loop']['show'] = false;
} else
    $this->_sections['none_loop']['total'] = 0;
if ($this->_sections['none_loop']['show']):

            for ($this->_sections['none_loop']['index'] = $this->_sections['none_loop']['start'], $this->_sections['none_loop']['iteration'] = 1;
                 $this->_sections['none_loop']['iteration'] <= $this->_sections['none_loop']['total'];
                 $this->_sections['none_loop']['index'] += $this->_sections['none_loop']['step'], $this->_sections['none_loop']['iteration']++):
$this->_sections['none_loop']['rownum'] = $this->_sections['none_loop']['iteration'];
$this->_sections['none_loop']['index_prev'] = $this->_sections['none_loop']['index'] - $this->_sections['none_loop']['step'];
$this->_sections['none_loop']['index_next'] = $this->_sections['none_loop']['index'] + $this->_sections['none_loop']['step'];
$this->_sections['none_loop']['first']      = ($this->_sections['none_loop']['iteration'] == 1);
$this->_sections['none_loop']['last']       = ($this->_sections['none_loop']['iteration'] == $this->_sections['none_loop']['total']);
?>
	    <img src='./images/icons/video_rating_none.gif' border='0'>
	  <?php endfor; endif; ?>
	</div>

            <?php else: ?>
	<div id='video_rating' onmouseout='rating_out()' style='float: left;'>
	  <?php $this->assign('rating', '0'); ?>
          <?php unset($this->_sections['full_loop']);
$this->_sections['full_loop']['name'] = 'full_loop';
$this->_sections['full_loop']['start'] = (int)0;
$this->_sections['full_loop']['loop'] = is_array($_loop=$this->_tpl_vars['video_info']['video_rating_full']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['full_loop']['show'] = true;
$this->_sections['full_loop']['max'] = $this->_sections['full_loop']['loop'];
$this->_sections['full_loop']['step'] = 1;
if ($this->_sections['full_loop']['start'] < 0)
    $this->_sections['full_loop']['start'] = max($this->_sections['full_loop']['step'] > 0 ? 0 : -1, $this->_sections['full_loop']['loop'] + $this->_sections['full_loop']['start']);
else
    $this->_sections['full_loop']['start'] = min($this->_sections['full_loop']['start'], $this->_sections['full_loop']['step'] > 0 ? $this->_sections['full_loop']['loop'] : $this->_sections['full_loop']['loop']-1);
if ($this->_sections['full_loop']['show']) {
    $this->_sections['full_loop']['total'] = min(ceil(($this->_sections['full_loop']['step'] > 0 ? $this->_sections['full_loop']['loop'] - $this->_sections['full_loop']['start'] : $this->_sections['full_loop']['start']+1)/abs($this->_sections['full_loop']['step'])), $this->_sections['full_loop']['max']);
    if ($this->_sections['full_loop']['total'] == 0)
        $this->_sections['full_loop']['show'] = false;
} else
    $this->_sections['full_loop']['total'] = 0;
if ($this->_sections['full_loop']['show']):

            for ($this->_sections['full_loop']['index'] = $this->_sections['full_loop']['start'], $this->_sections['full_loop']['iteration'] = 1;
                 $this->_sections['full_loop']['iteration'] <= $this->_sections['full_loop']['total'];
                 $this->_sections['full_loop']['index'] += $this->_sections['full_loop']['step'], $this->_sections['full_loop']['iteration']++):
$this->_sections['full_loop']['rownum'] = $this->_sections['full_loop']['iteration'];
$this->_sections['full_loop']['index_prev'] = $this->_sections['full_loop']['index'] - $this->_sections['full_loop']['step'];
$this->_sections['full_loop']['index_next'] = $this->_sections['full_loop']['index'] + $this->_sections['full_loop']['step'];
$this->_sections['full_loop']['first']      = ($this->_sections['full_loop']['iteration'] == 1);
$this->_sections['full_loop']['last']       = ($this->_sections['full_loop']['iteration'] == $this->_sections['full_loop']['total']);
?>
	    <?php $this->assign('rating', $this->_tpl_vars['rating']+1); ?>
	    <img src='./images/icons/video_rating_full.gif' border='0' onmouseover="rating_over(<?php echo $this->_tpl_vars['rating']; ?>
);" onclick="rate(<?php echo $this->_tpl_vars['rating']; ?>
);" id='rate_<?php echo $this->_tpl_vars['rating']; ?>
' style='cursor:pointer;'>
	  <?php endfor; endif; ?>
	  <?php if ($this->_tpl_vars['video_info']['video_rating_part']): ?>
	    <?php $this->assign('rating', $this->_tpl_vars['rating']+1); ?>
	    <img src='./images/icons/video_rating_part.gif' border='0' onmouseover="rating_over(<?php echo $this->_tpl_vars['rating']; ?>
);" onclick="rate(<?php echo $this->_tpl_vars['rating']; ?>
);" id='rate_<?php echo $this->_tpl_vars['rating']; ?>
' style='cursor:pointer;'>
          <?php endif; ?>
          <?php unset($this->_sections['none_loop']);
$this->_sections['none_loop']['name'] = 'none_loop';
$this->_sections['none_loop']['start'] = (int)0;
$this->_sections['none_loop']['loop'] = is_array($_loop=$this->_tpl_vars['video_info']['video_rating_none']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['none_loop']['show'] = true;
$this->_sections['none_loop']['max'] = $this->_sections['none_loop']['loop'];
$this->_sections['none_loop']['step'] = 1;
if ($this->_sections['none_loop']['start'] < 0)
    $this->_sections['none_loop']['start'] = max($this->_sections['none_loop']['step'] > 0 ? 0 : -1, $this->_sections['none_loop']['loop'] + $this->_sections['none_loop']['start']);
else
    $this->_sections['none_loop']['start'] = min($this->_sections['none_loop']['start'], $this->_sections['none_loop']['step'] > 0 ? $this->_sections['none_loop']['loop'] : $this->_sections['none_loop']['loop']-1);
if ($this->_sections['none_loop']['show']) {
    $this->_sections['none_loop']['total'] = min(ceil(($this->_sections['none_loop']['step'] > 0 ? $this->_sections['none_loop']['loop'] - $this->_sections['none_loop']['start'] : $this->_sections['none_loop']['start']+1)/abs($this->_sections['none_loop']['step'])), $this->_sections['none_loop']['max']);
    if ($this->_sections['none_loop']['total'] == 0)
        $this->_sections['none_loop']['show'] = false;
} else
    $this->_sections['none_loop']['total'] = 0;
if ($this->_sections['none_loop']['show']):

            for ($this->_sections['none_loop']['index'] = $this->_sections['none_loop']['start'], $this->_sections['none_loop']['iteration'] = 1;
                 $this->_sections['none_loop']['iteration'] <= $this->_sections['none_loop']['total'];
                 $this->_sections['none_loop']['index'] += $this->_sections['none_loop']['step'], $this->_sections['none_loop']['iteration']++):
$this->_sections['none_loop']['rownum'] = $this->_sections['none_loop']['iteration'];
$this->_sections['none_loop']['index_prev'] = $this->_sections['none_loop']['index'] - $this->_sections['none_loop']['step'];
$this->_sections['none_loop']['index_next'] = $this->_sections['none_loop']['index'] + $this->_sections['none_loop']['step'];
$this->_sections['none_loop']['first']      = ($this->_sections['none_loop']['iteration'] == 1);
$this->_sections['none_loop']['last']       = ($this->_sections['none_loop']['iteration'] == $this->_sections['none_loop']['total']);
?>
	    <?php $this->assign('rating', $this->_tpl_vars['rating']+1); ?>
	    <img src='./images/icons/video_rating_none.gif' border='0' onmouseover="rating_over(<?php echo $this->_tpl_vars['rating']; ?>
);" onclick="rate(<?php echo $this->_tpl_vars['rating']; ?>
);" id='rate_<?php echo $this->_tpl_vars['rating']; ?>
' style='cursor:pointer;'>
	  <?php endfor; endif; ?>
	</div>

		<?php echo '
	<script type=\'text/javascript\'>
	<!--

	  preload_full = new Image();
	  preload_full.src = "./images/icons/video_rating_full.gif";
	  preload_partial = new Image();
	  preload_partial.src = "./images/icons/video_rating_part.gif";
	  preload_empty = new Image();
	  preload_empty.src = "./images/icons/video_rating_none.gif";

	  function rating_over(rating) {
	    for(var x=1; x<=5; x++) {
	      if(x <= rating) {
	        $(\'rate_\'+x).src = preload_full.src;
	      } else {
	        $(\'rate_\'+x).src = preload_empty.src;
	      }
	    }
	  }

	  function rating_out() {
	    for(var x=1; x<=5; x++) {
	      if(x <= '; 
 echo $this->_tpl_vars['video_info']['video_rating_full']; 
 echo ') {
	        $(\'rate_\'+x).src = preload_full.src;
	      } else if('; 
 echo $this->_tpl_vars['video_info']['video_rating_part']; 
 echo ' != 0 && x == '; 
 echo smarty_function_math(array('equation' => 'x+1','x' => $this->_tpl_vars['video_info']['video_rating_full']), $this);
 echo ') {
	        $(\'rate_\'+x).src = preload_partial.src;
	      } else {
	        $(\'rate_\'+x).src = preload_empty.src;
	      }
	    }
	  }

	  function rate(rating) {
	    $(\'video_rating\').onmouseout = null;
	    var request = new Request.JSON({
	      \'url\' : \'video.php\',
	      \'method\' : \'post\',
	      \'secure\' : false,
	      \'data\' : {
	        \'task\'  : \'rate_do\',
	        \'user\'  : \''; 
 echo $this->_tpl_vars['owner']->user_info['user_username']; 
 echo '\',
	        \'video_id\'  : \''; 
 echo $this->_tpl_vars['video_info']['video_id']; 
 echo '\',
		\'rating\' : rating
	      },
	      \'onComplete\' : function(responseObject, responseText)
	      {
	        rating_result(responseObject);
	      }
	    });
	    request.send();
	  }

	  function rating_result(rating) {
	    $(\'rating_total\').innerHTML = rating.rating_total;
	    for(var x=1; x<=5; x++) {
	      if(x <= rating.rating_full) {
	        $(\'rate_\'+x).src = preload_full.src;
	        if(!rating.allowed_to_rate) { $(\'rate_\'+x).onmouseover = null; $(\'rate_\'+x).onclick = null; }
	      } else if(rating.rating_part != 0 && x == rating.rating_full+1) {
	        $(\'rate_\'+x).src = preload_partial.src;
	        if(!rating.allowed_to_rate) { $(\'rate_\'+x).onmouseover = null; $(\'rate_\'+x).onclick = null; }
	      } else {
	        $(\'rate_\'+x).src = preload_empty.src;
	        if(!rating.allowed_to_rate) { $(\'rate_\'+x).onmouseover = null; $(\'rate_\'+x).onclick = null; }
	      }
	    }
	    if(!rating.allowed_to_rate) { $(\'video_rating\').onmouseout = null; }
	  }

	//-->
	</script>
	'; ?>
  

      <?php endif; ?>

            <div style='float: left; padding-left: 15px; padding-top: 5px;'>
	<?php $this->assign('uploaddate', $this->_tpl_vars['datetime']->time_since($this->_tpl_vars['video_info']['video_datecreated'])); ?>
	<?php ob_start(); 
 echo sprintf(SELanguage::_get($this->_tpl_vars['uploaddate'][0]), $this->_tpl_vars['uploaddate'][1]); 
 $this->_smarty_vars['capture']['default'] = ob_get_contents();  $this->assign('uploaded', ob_get_contents());ob_end_clean(); ?>
	<?php echo sprintf(SELanguage::_get(5500024), $this->_tpl_vars['uploaded']); ?>
      </div>
      <div style='float: left; padding-left: 15px; padding-top: 5px;'><?php echo sprintf(SELanguage::_get(5500037), $this->_tpl_vars['video_info']['video_rating_total']); ?></div>
      <div style='float: left; padding-left: 15px; padding-top: 5px;'><?php echo sprintf(SELanguage::_get(5500038), $this->_tpl_vars['video_info']['video_views']); ?></div>
      <div style='float: left; padding-left: 15px; padding-top: 5px;'><a href="javascript:TB_show('<?php echo SELanguage::_get(5500147); ?>', 'user_report.php?return_url=<?php echo ((is_array($_tmp=$this->_tpl_vars['url']->url_current())) ? $this->_run_mod_handler('escape', true, $_tmp, 'url') : smarty_modifier_escape($_tmp, 'url')); ?>
&TB_iframe=true&height=300&width=450', '', './images/trans.gif');"><?php echo SELanguage::_get(5500147); ?></a></div>
      <div style='clear: both; height: 0px;'></div>

    </div>

  </div>

  <br>

  
  <div id="video_<?php echo $this->_tpl_vars['video_info']['video_id']; ?>
_postcomment"></div>
  <div id="video_<?php echo $this->_tpl_vars['video_info']['video_id']; ?>
_comments" style='margin-left: auto; margin-right: auto;'></div>
      
  <?php 
$javascript_lang_import_list = SELanguage::_javascript_redundancy_filter(array(39,155,175,182,183,184,185,187,784,787,829,830,831,832,833,834,835,854,856,891,1025,1026,1032,1034,1071));
$javascript_lang_import_first = TRUE;
if( is_array($javascript_lang_import_list) && !empty($javascript_lang_import_list) )
{
  echo "\n<script type='text/javascript'>\n<!--\n";
  echo "SocialEngine.Language.Import({\n";
  foreach( $javascript_lang_import_list as $javascript_import_id )
  {
    if( !$javascript_lang_import_first ) echo ",\n";
    echo "  ".$javascript_import_id." : '".addslashes(SE_Language::_get($javascript_import_id))."'";
    $javascript_lang_import_first = FALSE;
  }
  echo "\n});\n//-->\n</script>\n";
}
 ?>
  <script type="text/javascript">
        
    SocialEngine.VideoComments = new SocialEngineAPI.Comments({
      'canComment' : <?php if ($this->_tpl_vars['allowed_to_comment']): ?>true<?php else: ?>false<?php endif; ?>,
      'commentHTML' : '<?php echo ((is_array($_tmp=$this->_tpl_vars['setting']['setting_comment_html'])) ? $this->_run_mod_handler('replace', true, $_tmp, ",", ", ") : smarty_modifier_replace($_tmp, ",", ", ")); ?>
',
      'commentCode' : <?php if ($this->_tpl_vars['setting']['setting_comment_code']): ?>true<?php else: ?>false<?php endif; ?>,

      'type' : 'video',
      'typeIdentifier' : 'video_id',
      'typeID' : <?php echo $this->_tpl_vars['video_info']['video_id']; ?>
,
          
      'typeTab' : 'videos',
      'typeCol' : 'video',
          
      'initialTotal' : <?php echo ((is_array($_tmp=@$this->_tpl_vars['total_comments'])) ? $this->_run_mod_handler('default', true, $_tmp, 0) : smarty_modifier_default($_tmp, 0)); ?>

    });
        
    SocialEngine.RegisterModule(SocialEngine.VideoComments);
       
    // Backwards
    function addComment(is_error, comment_body, comment_date)
    {
      SocialEngine.VideoComments.addComment(is_error, comment_body, comment_date);
    }
        
    function getComments(direction)
    {
      SocialEngine.VideoComments.getComments(direction);
    }

  </script>


</td>
<td valign='top' align='left' width='100%'>

  <div id='videoTabFrame'>

    <div class='header'><?php echo sprintf(SELanguage::_get(5500022), $this->_tpl_vars['owner']->user_displayname_short); ?> (<?php echo $this->_tpl_vars['total_videos']; ?>
)</div>
    <div class='video_box' style='margin-bottom: 10px; padding-bottom: 10px; height: 395px; overflow: auto;'>

            <?php unset($this->_sections['video_loop']);
$this->_sections['video_loop']['name'] = 'video_loop';
$this->_sections['video_loop']['loop'] = is_array($_loop=$this->_tpl_vars['videos']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['video_loop']['show'] = true;
$this->_sections['video_loop']['max'] = $this->_sections['video_loop']['loop'];
$this->_sections['video_loop']['step'] = 1;
$this->_sections['video_loop']['start'] = $this->_sections['video_loop']['step'] > 0 ? 0 : $this->_sections['video_loop']['loop']-1;
if ($this->_sections['video_loop']['show']) {
    $this->_sections['video_loop']['total'] = $this->_sections['video_loop']['loop'];
    if ($this->_sections['video_loop']['total'] == 0)
        $this->_sections['video_loop']['show'] = false;
} else
    $this->_sections['video_loop']['total'] = 0;
if ($this->_sections['video_loop']['show']):

            for ($this->_sections['video_loop']['index'] = $this->_sections['video_loop']['start'], $this->_sections['video_loop']['iteration'] = 1;
                 $this->_sections['video_loop']['iteration'] <= $this->_sections['video_loop']['total'];
                 $this->_sections['video_loop']['index'] += $this->_sections['video_loop']['step'], $this->_sections['video_loop']['iteration']++):
$this->_sections['video_loop']['rownum'] = $this->_sections['video_loop']['iteration'];
$this->_sections['video_loop']['index_prev'] = $this->_sections['video_loop']['index'] - $this->_sections['video_loop']['step'];
$this->_sections['video_loop']['index_next'] = $this->_sections['video_loop']['index'] + $this->_sections['video_loop']['step'];
$this->_sections['video_loop']['first']      = ($this->_sections['video_loop']['iteration'] == 1);
$this->_sections['video_loop']['last']       = ($this->_sections['video_loop']['iteration'] == $this->_sections['video_loop']['total']);
?>    

                <?php if ($this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_title'] == ""): 
 ob_start(); 
 echo SELanguage::_get(589); 
 $this->_smarty_vars['capture']['default'] = ob_get_contents();  $this->assign('video_title', ob_get_contents());ob_end_clean(); 
 else: 
 $this->assign('video_title', $this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_title']); 
 endif; ?>

	<div class='video_row' style='<?php if ($this->_sections['video_loop']['first']): ?>padding-top: 0px; border-top: none;<?php endif; ?>'>
	  <table cellpadding='0' cellspacing='0'>
	  <tr>
	  <td style='vertical-align: top;' width='1'>
            <div class='video_row_nowplaying<?php if ($this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_id'] == $this->_tpl_vars['video_info']['video_id']): ?>2<?php endif; ?>'<?php if ($this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_id'] != $this->_tpl_vars['video_info']['video_id']): ?>onMouseOver="this.className='video_row_nowplaying2'" onMouseOut="this.className='video_row_nowplaying'"<?php endif; ?>><a href='<?php echo $this->_tpl_vars['url']->url_create('video',$this->_tpl_vars['owner']->user_info['user_username'],$this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_id']); ?>
'><img src='<?php if ($this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_thumb']): 
 echo $this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_dir']; 
 echo $this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_id']; ?>
_thumb.jpg<?php else: ?>./images/video_placeholder.gif<?php endif; ?>' border='0' width='<?php echo $this->_tpl_vars['setting']['setting_video_thumb_width']; ?>
' height='<?php echo $this->_tpl_vars['setting']['setting_video_thumb_height']; ?>
'></a></div>
	  </td>
	  <td style='vertical-align: top; padding-left: 7px;'>
            <div class='video_row_title'><a href='<?php echo $this->_tpl_vars['url']->url_create('video',$this->_tpl_vars['owner']->user_info['user_username'],$this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_id']); ?>
'><?php echo ((is_array($_tmp=$this->_tpl_vars['video_title'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 45, '...', true) : smarty_modifier_truncate($_tmp, 45, '...', true)); ?>
</a></div>
            <div class='video_row_info'>
<?php if ($this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_type'] == 0): 
 echo $this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_duration_in_min']; ?>
 - <?php endif; 
 echo sprintf(SELanguage::_get(5500023), $this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['total_comments']); ?> - <?php echo sprintf(SELanguage::_get(5500070), $this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_views']); ?></div>
            <div>
              <?php unset($this->_sections['full_loop']);
$this->_sections['full_loop']['name'] = 'full_loop';
$this->_sections['full_loop']['start'] = (int)0;
$this->_sections['full_loop']['loop'] = is_array($_loop=$this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_rating_full']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['full_loop']['show'] = true;
$this->_sections['full_loop']['max'] = $this->_sections['full_loop']['loop'];
$this->_sections['full_loop']['step'] = 1;
if ($this->_sections['full_loop']['start'] < 0)
    $this->_sections['full_loop']['start'] = max($this->_sections['full_loop']['step'] > 0 ? 0 : -1, $this->_sections['full_loop']['loop'] + $this->_sections['full_loop']['start']);
else
    $this->_sections['full_loop']['start'] = min($this->_sections['full_loop']['start'], $this->_sections['full_loop']['step'] > 0 ? $this->_sections['full_loop']['loop'] : $this->_sections['full_loop']['loop']-1);
if ($this->_sections['full_loop']['show']) {
    $this->_sections['full_loop']['total'] = min(ceil(($this->_sections['full_loop']['step'] > 0 ? $this->_sections['full_loop']['loop'] - $this->_sections['full_loop']['start'] : $this->_sections['full_loop']['start']+1)/abs($this->_sections['full_loop']['step'])), $this->_sections['full_loop']['max']);
    if ($this->_sections['full_loop']['total'] == 0)
        $this->_sections['full_loop']['show'] = false;
} else
    $this->_sections['full_loop']['total'] = 0;
if ($this->_sections['full_loop']['show']):

            for ($this->_sections['full_loop']['index'] = $this->_sections['full_loop']['start'], $this->_sections['full_loop']['iteration'] = 1;
                 $this->_sections['full_loop']['iteration'] <= $this->_sections['full_loop']['total'];
                 $this->_sections['full_loop']['index'] += $this->_sections['full_loop']['step'], $this->_sections['full_loop']['iteration']++):
$this->_sections['full_loop']['rownum'] = $this->_sections['full_loop']['iteration'];
$this->_sections['full_loop']['index_prev'] = $this->_sections['full_loop']['index'] - $this->_sections['full_loop']['step'];
$this->_sections['full_loop']['index_next'] = $this->_sections['full_loop']['index'] + $this->_sections['full_loop']['step'];
$this->_sections['full_loop']['first']      = ($this->_sections['full_loop']['iteration'] == 1);
$this->_sections['full_loop']['last']       = ($this->_sections['full_loop']['iteration'] == $this->_sections['full_loop']['total']);
?>
	        <img src='./images/icons/video_rating_full_small.gif' border='0'>
	      <?php endfor; endif; ?>
	      <?php if ($this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_rating_part']): ?><img src='./images/icons/video_rating_part_small.gif' border='0'><?php endif; ?>
              <?php unset($this->_sections['none_loop']);
$this->_sections['none_loop']['name'] = 'none_loop';
$this->_sections['none_loop']['start'] = (int)0;
$this->_sections['none_loop']['loop'] = is_array($_loop=$this->_tpl_vars['videos'][$this->_sections['video_loop']['index']]['video_rating_none']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['none_loop']['show'] = true;
$this->_sections['none_loop']['max'] = $this->_sections['none_loop']['loop'];
$this->_sections['none_loop']['step'] = 1;
if ($this->_sections['none_loop']['start'] < 0)
    $this->_sections['none_loop']['start'] = max($this->_sections['none_loop']['step'] > 0 ? 0 : -1, $this->_sections['none_loop']['loop'] + $this->_sections['none_loop']['start']);
else
    $this->_sections['none_loop']['start'] = min($this->_sections['none_loop']['start'], $this->_sections['none_loop']['step'] > 0 ? $this->_sections['none_loop']['loop'] : $this->_sections['none_loop']['loop']-1);
if ($this->_sections['none_loop']['show']) {
    $this->_sections['none_loop']['total'] = min(ceil(($this->_sections['none_loop']['step'] > 0 ? $this->_sections['none_loop']['loop'] - $this->_sections['none_loop']['start'] : $this->_sections['none_loop']['start']+1)/abs($this->_sections['none_loop']['step'])), $this->_sections['none_loop']['max']);
    if ($this->_sections['none_loop']['total'] == 0)
        $this->_sections['none_loop']['show'] = false;
} else
    $this->_sections['none_loop']['total'] = 0;
if ($this->_sections['none_loop']['show']):

            for ($this->_sections['none_loop']['index'] = $this->_sections['none_loop']['start'], $this->_sections['none_loop']['iteration'] = 1;
                 $this->_sections['none_loop']['iteration'] <= $this->_sections['none_loop']['total'];
                 $this->_sections['none_loop']['index'] += $this->_sections['none_loop']['step'], $this->_sections['none_loop']['iteration']++):
$this->_sections['none_loop']['rownum'] = $this->_sections['none_loop']['iteration'];
$this->_sections['none_loop']['index_prev'] = $this->_sections['none_loop']['index'] - $this->_sections['none_loop']['step'];
$this->_sections['none_loop']['index_next'] = $this->_sections['none_loop']['index'] + $this->_sections['none_loop']['step'];
$this->_sections['none_loop']['first']      = ($this->_sections['none_loop']['iteration'] == 1);
$this->_sections['none_loop']['last']       = ($this->_sections['none_loop']['iteration'] == $this->_sections['none_loop']['total']);
?>
	        <img src='./images/icons/video_rating_none_small.gif' border='0'>
	      <?php endfor; endif; ?>
            </div>
	  </td>
	  </tr>
	  </table>
	</div>
      <?php endfor; endif; ?>
 
    </div>
          
  </div>


</td>
</tr>
</table>




<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'footer.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>